<?php
//filename : module/SanAuthWithDbSaveHandler/view/san-auth-with-db-save-handler/auth/index.phtml
$title = 'Cập nhật thông tin';
$this->headTitle($title);
?>
<script type="text/javascript">
$(document).ready(function(){
	
			// Validate form
			$("#benhnhan").validate({
				errorElement: "span", // Định dạng cho thẻ HTML hiện thông báo lỗi
				rules: {
					hoten: { rangelength: [2,20] }, //Chiều dài chuỗi trong khoảng từ 4 - 10 ký tự
					motabenh: { rangelength: [4,40] },
					
				}
			});
	
});
</script>

 	<div class="nav-bar">
	<span class="crust">
					<a href="<?php echo $this->url('xembenhnhan', array('action' => 'index'));
        ?>" class="crumb"><span><?php  echo 'Sửa thông tin bệnh nhân' ?></span></a>
					<span class="arrow"><span></span></span>
	</span>

	</div>
	
<div class="login_form">
        
        <div class="login_body">
          <h1>Nhập thông tin bệnh nhân</h1>
              <?php 
				$form = $this->form;
				$form->setAttribute('action', $this->url(
					'xembenhnhan', array('action' => 'editbenhnhan', 'id' => $this->id)
				));
				$form->prepare();
 				echo $this->form()->openTag($form); echo $this->formHidden($form->get('id')) . PHP_EOL;?>
                  <table style="margin-top:20px;">
                    <tr>
                        <td>Số CMT </td>
                        <td><?php echo $this->formRow($form->get('cmt')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>Họ và tên </td>
                        <td><?php echo $this->formRow($form->get('hoten')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>Ngày sinh </td>
                        <td><?php echo $this->formRow($form->get('ngaysinh')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>Giới tính </td>
                        <td><?php echo $this->formRow($form->get('gioitinh')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>Địa chỉ </td>
                        <td><?php echo $this->formRow($form->get('diachi')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>Số ĐT </td>
                        <td><?php echo $this->formRow($form->get('dienthoai')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>Chức Vụ </td>
                        <td><?php echo $this->formRow($form->get('chucvu')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>Đơn vị công tác </td>
                        <td><?php echo $this->formRow($form->get('congtac')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>Ngày khám bệnh </td>
                        <td><?php echo $this->formRow($form->get('ngaykham')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>Mô tả bệnh </td>
                        <td><?php echo $this->formRow($form->get('motabenh')) . PHP_EOL; ?></td>
                    </tr>
                    <tr>
                        <td>  <?php echo $this->formRow($form->get('submit')) . PHP_EOL; ?></td>
                        <td> <a class="add_button" href="<?php echo $this->url('xembenhnhan') ?>">Hủy</a></td>
                    </tr>
                 </table> 
            <?php echo $this->form()->closeTag(); ?>
        </div>
        <div id="error" class="error"><?php echo $this->error; ?></div>
        </div>

